🎖️GitЯра🎖️
Commit aa1edae4b2ef1d74187bab64f5cb43f1b129ac11
Parents : 2658271
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-07-22T17:30:05-05:00
Committer : GitHub <noreply@github.com>
Date : 2026-07-22T22:30:05Z
fix(node-metrics): apply full typography style instead of fontSize-only (#6375)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Changes
11 files changed, 23 insertions(+), 27 deletions(-)
Diff
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt
index 43ceebb46b..65a6a9bfd9 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/CommonCharts.kt
@@ -174,7 +174,7 @@ fun Legend(
Text(
text = label,
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelSmall.fontSize,
+ style = MaterialTheme.typography.labelSmall,
)
}
}
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt
index 82e0704d6b..67bccc7498 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/DeviceMetrics.kt
@@ -483,7 +483,7 @@ private fun DeviceMetricsCard(
text =
formatString(labelValueTemplate, uptimeLabel, formatUptime(deviceMetrics?.uptime_seconds ?: 0)),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt
index 6d989cc54b..8cf959ed7b 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/EnvironmentMetrics.kt
@@ -148,7 +148,7 @@ private fun TemperatureDisplay(
Text(
text = formatString(textFormat, stringResource(Res.string.temperature), temperature),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -176,7 +176,7 @@ private fun HumidityAndBarometricPressureDisplay(envMetrics: org.meshtastic.prot
Res.string.humidity,
)} ${MetricFormatter.percent(humidity, decimalPlaces = 2)}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
modifier = Modifier.padding(vertical = 0.dp),
)
}
@@ -189,7 +189,7 @@ private fun HumidityAndBarometricPressureDisplay(envMetrics: org.meshtastic.prot
Text(
text = MetricFormatter.pressure(pressure, decimalPlaces = 2),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
modifier = Modifier.padding(vertical = 0.dp),
)
}
@@ -223,7 +223,7 @@ private fun SoilMetricsDisplay(
soilMoistureValue,
),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -241,7 +241,7 @@ private fun SoilMetricsDisplay(
soilTemperature,
),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -265,7 +265,7 @@ private fun LuxUVLuxDisplay(envMetrics: org.meshtastic.proto.EnvironmentMetrics)
Text(
text = formatString("%s %.0f lx", stringResource(Res.string.lux), luxValue),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -277,7 +277,7 @@ private fun LuxUVLuxDisplay(envMetrics: org.meshtastic.proto.EnvironmentMetrics)
Text(
text = formatString("%s %.0f UVlx", stringResource(Res.string.uv_lux), uvLuxValue),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -297,7 +297,7 @@ private fun VoltageCurrentDisplay(envMetrics: org.meshtastic.proto.EnvironmentMe
Text(
text = "${stringResource(Res.string.voltage)} ${MetricFormatter.voltage(voltage)}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
if (hasCurrent) {
@@ -308,7 +308,7 @@ private fun VoltageCurrentDisplay(envMetrics: org.meshtastic.proto.EnvironmentMe
Res.string.current,
)} ${MetricFormatter.current(currentValue, decimalPlaces = 2)}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -329,7 +329,7 @@ private fun GasCompositionDisplay(envMetrics: org.meshtastic.proto.EnvironmentMe
Text(
text = stringResource(Res.string.iaq),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
Spacer(Modifier.width(4.dp))
IndoorAirQuality(iaq = iaqValue, displayMode = IaqDisplayMode.Dot)
@@ -342,7 +342,7 @@ private fun GasCompositionDisplay(envMetrics: org.meshtastic.proto.EnvironmentMe
Text(
text = formatString("%s %.2f Ohm", stringResource(Res.string.gas_resistance), gasResistance),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -361,7 +361,7 @@ private fun RadiationDisplay(envMetrics: org.meshtastic.proto.EnvironmentMetrics
Text(
text = formatString("%s %.2f µR/h", stringResource(Res.string.radiation), radiation),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -408,7 +408,7 @@ private fun WindSpeedRow(envMetrics: org.meshtastic.proto.EnvironmentMetrics, is
Text(
text = dirText,
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -429,7 +429,7 @@ private fun WindGustLullRow(
MetricFormatter.windSpeed(envMetrics.wind_gust!!, isImperial)
}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
if (hasLull) {
@@ -439,7 +439,7 @@ private fun WindGustLullRow(
MetricFormatter.windSpeed(envMetrics.wind_lull!!, isImperial)
}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -459,7 +459,7 @@ private fun RainfallDisplay(envMetrics: org.meshtastic.proto.EnvironmentMetrics,
Res.string.rainfall_1h,
)} ${MetricFormatter.rainfall(envMetrics.rainfall_1h!!, isImperial)}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
if (has24h) {
@@ -469,7 +469,7 @@ private fun RainfallDisplay(envMetrics: org.meshtastic.proto.EnvironmentMetrics,
Res.string.rainfall_24h,
)} ${MetricFormatter.rainfall(envMetrics.rainfall_24h!!, isImperial)}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
@@ -503,7 +503,7 @@ private fun OneWireTemperatureDisplay(
Text(
text = formatString(textFormat, stringResource(Res.string.one_wire_temperature), idx + 1, temp),
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/MetricLogComponents.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/MetricLogComponents.kt
index 47f9dda0b9..cc9b5fbc89 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/MetricLogComponents.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/MetricLogComponents.kt
@@ -136,10 +136,6 @@ fun MetricValueRow(color: Color, text: String, modifier: Modifier = Modifier) {
Row(verticalAlignment = Alignment.CenterVertically, modifier = modifier) {
MetricIndicator(color)
Spacer(Modifier.width(4.dp))
- Text(
- text = text,
- color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
- )
+ Text(text = text, color = MaterialTheme.colorScheme.onSurface, style = MaterialTheme.typography.labelLarge)
}
}
diff --git a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt
index 6c809c1f17..deef6db77e 100644
--- a/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt
+++ b/feature/node/src/commonMain/kotlin/org/meshtastic/feature/node/metrics/PositionLogComponents.kt
@@ -102,7 +102,7 @@ fun PositionCard(
Text(
text = "${stringResource(Res.string.sats)}: ${position.sats_in_view}",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
@@ -140,7 +140,7 @@ fun PositionCard(
formatString("%.0f", (position.ground_track ?: 0) * HEADING_DEG)
}\u00B0",
color = MaterialTheme.colorScheme.onSurface,
- fontSize = MaterialTheme.typography.labelLarge.fontSize,
+ style = MaterialTheme.typography.labelLarge,
)
}
}
diff --git a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Dark_d19fbf1f_0.png b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Dark_d19fbf1f_0.png
index c869fc486a..1fa234e953 100644
Binary files a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Dark_d19fbf1f_0.png and b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Dark_d19fbf1f_0.png differ
diff --git a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Light_b29dc7a7_0.png b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Light_b29dc7a7_0.png
index b84ea8db47..f1adf4495f 100644
Binary files a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Light_b29dc7a7_0.png and b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotDeviceMetricsCard_Light_b29dc7a7_0.png differ
diff --git a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Dark_d19fbf1f_0.png b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Dark_d19fbf1f_0.png
index d5a0185d13..c8b7c3e6ed 100644
Binary files a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Dark_d19fbf1f_0.png and b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Dark_d19fbf1f_0.png differ
diff --git a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Light_b29dc7a7_0.png b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Light_b29dc7a7_0.png
index 8df596a816..32cca0d53d 100644
Binary files a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Light_b29dc7a7_0.png and b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotEnvironmentMetricsContent_Light_b29dc7a7_0.png differ
diff --git a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Dark_d19fbf1f_0.png b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Dark_d19fbf1f_0.png
index 39a089614f..1f213f4c43 100644
Binary files a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Dark_d19fbf1f_0.png and b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Dark_d19fbf1f_0.png differ
diff --git a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Light_b29dc7a7_0.png b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Light_b29dc7a7_0.png
index cb0ace90ca..f21870f238 100644
Binary files a/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Light_b29dc7a7_0.png and b/screenshot-tests/src/screenshotTestDebug/reference/org/meshtastic/screenshots/feature/NodeScreenshotTestsKt/ScreenshotLegend_Light_b29dc7a7_0.png differ
Served by rngit 1.5.4 - Generated in 0.12s